﻿<span>@Field</span>

<input value="@Field" @onchange="@OnChanged" />

@*<input @bind="@Field" />*@

@code {
    [Parameter]
    public string Field { get; set; }

    [Parameter]
    public EventCallback<string> FieldChanged { get; set; }

    private async Task OnChanged(ChangeEventArgs e)
    {
        Field = e.Value.ToString();
        if (FieldChanged.HasDelegate)
        {
            await FieldChanged.InvokeAsync(Field);
        }
    }
}
